<?php
namespace App\Libs\Helper;
use \Phalcon\Crypt;
class CryptHelper
{
    static $key = 'MhxZkhl@19902015';
    public static function encrypt($data) {
        $crypt = new Crypt();
        return $crypt->encryptBase64($data, self::$key);
    }

    public static function decrypt($data) {
    	try {
        	$crypt = new Crypt();
        	return $crypt->decryptBase64($data, self::$key);
    	} catch(\Exception $e) {
    		return false;
    	}
    }

}
